unit shbl_Card;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ActnList, StdCtrls, ExtCtrls, Buttons, ComCtrls, ToolWin,
  PropFilerEh, PropStorageEh, pFIBDatabase;

type
  TshblCard = class(TForm)
    Panel1: TPanel;
    ActionList1: TActionList;
    aSave: TAction;
    aCancel: TAction;
    aPrint: TAction;
    ToolBar1: TToolBar;
    ToolButton1: TToolButton;
    ToolButton2: TToolButton;
    ToolButton3: TToolButton;
    ToolButton4: TToolButton;
    BitBtn1: TBitBtn;
    BitBtn2: TBitBtn;
    PropStorage: TPropStorageEh;
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure FormKeyUp(Sender: TObject; var Key: Word;
      Shift: TShiftState);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public

    error_mode :integer;
  end;

var
  shblCard: TshblCard;

implementation

uses uMain;

{$R *.dfm}

procedure TshblCard.FormClose(Sender: TObject; var Action: TCloseAction);
var i :integer;
begin
  for i := 0 to Self.ComponentCount - 1 do begin
    if Self.Components[i].InheritsFrom(TpFIBTransaction) then begin
      if (Self.Components[i] as TpFIBTransaction).Active then
        (Self.Components[i] as TpFIBTransaction).RollBack;

    end;
  end;
end;

procedure TshblCard.FormKeyUp(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
  if Key = VK_ESCAPE then Self.Close;
end;

procedure TshblCard.FormCreate(Sender: TObject);
begin
  KeyPreview := True;
end;

end.
